\documentclass[11pt]{article}
\usepackage{fullpage}
\usepackage{amssymb,amsfonts,amsmath,amsthm} 
\usepackage[margin= 1in]{geometry}
\usepackage{url}

\usepackage{enumerate}
\usepackage{color}
\usepackage[pdftex]{graphicx}
\usepackage{lastpage}
\usepackage{mathptmx}

\newtheorem{thm}{THEOREM}[]
\newtheorem{lem}[thm]{LEMMA}
\newtheorem{cor}[thm]{COROLLARY}
\newtheorem{prop}[thm]{PROPOSITION}
\newtheorem{as}[thm]{ASSUMPTION}
\newtheorem{conjecture}[thm]{Conjecture}
\newtheorem{claim}[thm]{CLAIM}
\theoremstyle{definition}
\newtheorem{defi}[]{DEFINITION}
\theoremstyle{definition}
\newtheorem{remark}[thm]{REMARK}
\newtheorem{fact}[thm]{Fact}
\newtheorem{ex}[thm]{Example}

\setlength{\parindent}{0cm}

\newcommand{\tab}{\hspace{3ex}}
\newcommand{\R}{\mathbb{R}}

\usepackage{titlesec}
\usepackage{sectsty}
\hyphenchar\font=-1

\sectionfont{  \normalsize	\sectionrule{0pt}{0pt}{-5pt}{0.05pt}
	}

\titleformat*{\section}{ \Large  \center}
\titleformat{\subsection}[runin]
               {\normalfont\bfseries }
               {}{0em}{}[.]
               
\titlespacing{\section}
               {\parindent}{0pt}{5pt}
\titlespacing{\subsection}
               {0pt}{2ex plus .1ex minus .2ex}{5pt} 

               \makeatletter
 \renewcommand{\@evenfoot}{%
   Page \thepage{} of \pageref{VeryLastPage} \hfil
    
 }
 \renewcommand{\@oddfoot}{\@evenfoot}
 \makeatother

\begin{document}

\begin{center}
{\huge  \sc   Homework 8} \\
\smallskip
{ Due Date: 11/16/2021}\\
\smallskip
{Name:  }\\
{\large  }
\end{center}
\vspace{1cm}

\begin{enumerate}

\item[13.1] 
\begin{enumerate}
\item Find $r$ with $0\leq r \leq 10$ such that $7^{137}\equiv r\pmod 11$. 

\item Find $r$ with $0\leq r \leq 645$ such that $2^{81}\equiv r\pmod 645$. 

\item Find the last two digits of $3^{124}$

\item Show that there is a multiple of 21 which has 241 as its last three digits. 
\newpage

\end{enumerate}
\newpage
\item[13.2] Let $p$ be a prime number and $k$ a positive integer.

\begin{enumerate}
    \item Show that if $x$ is an integer such that $x^2\equiv x \pmod p$, then $x\equiv 0\pmod p$ or $x\equiv 1\pmod p$. 
    
    \item Show that if $x$ is an integer such that $x^2\equiv x \pmod {p^k}$, then $x\equiv 0\pmod p{^k}$ or $x\equiv 1\pmod {p^k}$. 
    
\end{enumerate}
\newpage

\item[10.3] For each of the following congruence equations, either find a solution $x\in\mathbb{Z}$ or show that no solution exists. 

\begin{enumerate}

\item $ 99x\equiv 18\pmod {30}$

\item $91x\equiv 84\pmod {143}$. 

\item  $x^2\equiv 2\pmod {5}$. 

\item $x^2+x+1\equiv 0\pmod {5}$. 

\item $x^2+x+1\equiv 0\pmod {7}$. 

\end{enumerate}
\newpage

\item[10.4] 

\begin{enumerate}
    \item Prove the "rule of 9": an integer is divisible by 9 if and only if the sum of its digits is divisible by 9.
    
     \item Prove the "rule of 11" stated in Example 13.6. Use this rule to decide in your head whether the number 82918073579 is divisible by 11. 
    
\end{enumerate}

\newpage

\item[13.6]Let $p$ be a prime number, and let $a$ be an integer that is not divisible by $p$. Prove that the congruence equation $ax \equiv 1 \pmod{p} $ has a solution $x\in\mathbb{Z}$

\newpage

\newpage 

\end{enumerate}

\label{VeryLastPage}
\end{document}